#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main() {
	double a, b, x;
	scanf("%lf%lf%lf", &a, &b, &x);
	printf("%.6lf", sqrt(a * a + b * b - 2 * a * b * cos(x*acos(-1)/180)));
	return 0;
}